#include "display_task.h"
#include "usart.h"
#include "main.h"
#include <math.h>

uint16_t TimerEncoder = 0,TimerEncoderLast = 0;

void display_task(void)
{
	TimerEncoder = __HAL_TIM_GET_COUNTER(&htim2);
//	if(TimerEncoder != TimerEncoderLast)
//	{
	if(Info.u8_sys_state == SYSTEM_Cali_dot)
	{
		Host_write06_slave(0x02,0x06,0x01,0x00);
		Host_write06_slave(0x02,0x06,0x02,TimerEncoder/4);
	//	printf("Encoder Value %d\r\n",TimerEncoder/4);
		TimerEncoderLast = TimerEncoder;
	}
		
//	}
	
} 

